//
//  GMSearchResultsVC.m
//  StockSystem
//
//  Created by 小熊 on 2018/7/4.
//  Copyright © 2018年 小熊. All rights reserved.
//

#import "GMSearchResultsVC.h"
#import "GMHomeTableViewCell.h"
@interface GMSearchResultsVC ()<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic, strong) UITableView *tabView;
@property (nonatomic, strong) NSMutableArray *dataSource;

@end

@implementation GMSearchResultsVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"搜索结果";
    [self.tabView registerNib:[UINib nibWithNibName:@"GMHomeTableViewCell" bundle:nil] forCellReuseIdentifier:@"GMHomeTableViewCell"];
}
- (NSMutableArray *)dataSource{
    if (!_dataSource) {
        _dataSource =[[NSMutableArray alloc]init];
    }
    return _dataSource;
}
- (UITableView *)tabView{
    if (!_tabView) {
        _tabView =[UITableView zj_tableViewWithSuperview:self.view delegate:self style:UITableViewStylePlain constraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        [_tabView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
        _tabView.showsVerticalScrollIndicator =NO;
    }
    return _tabView;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    GMHomeTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GMHomeTableViewCell" forIndexPath:indexPath];
    return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 100;
}
// 返回多少组(组)
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}
// 返回每组有多少行(行)
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 10;
}

@end
